//
//  HCMineStoreView.m
//  HappyChildren
//
//  Created by WillyZhao on 2017/1/21.
//  Copyright © 2017年 WillyZhao. All rights reserved.
//

#import "HCMineStoreView.h"

#import "HCMineStoreTableViewCell.h"

@interface HCMineStoreView () <UITableViewDataSource,UITableViewDelegate> {
    UITableView *tableView_;
}

@end

@implementation HCMineStoreView

-(instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self initializeSubview:frame];
    }
    return self;
}

-(void)initializeSubview:(CGRect)frame {
    
    tableView_ = [[UITableView alloc] initWithFrame:frame];
    tableView_.delegate = self;
    tableView_.dataSource = self;
    tableView_.separatorStyle = UITableViewCellSeparatorStyleNone;
    tableView_.rowHeight = YBKAdaptiveH(130);
    tableView_.backgroundColor = YBKRGBCOLOR(242, 242, 242, 1);
    [self addSubview:tableView_];
    
    [tableView_ registerNib:[UINib nibWithNibName:@"HCMineStoreTableViewCell" bundle:[NSBundle mainBundle]] forCellReuseIdentifier:@"minestore"];
}

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 2;
}

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    HCMineStoreTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"minestore" forIndexPath:indexPath];
    return cell;
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
